package com.zuoye.text6;

import com.zuoye.text7.News3;
import com.zuoye.text7.NewsDao3;

import java.util.List;

public class NewsServiceImpl2 implements NewsService2 {
    private NewsDao3 newsDao;

    public NewsDao3 getNewsDao() {
        return newsDao;
    }

    public void setNewsDao(NewsDao3 newsDao) {
        this.newsDao = newsDao;
    }

    @Override
    public boolean updateNews(News3 news) {
        return newsDao.update(news);
    }

    @Override
    public boolean addNews(News3 news) {
        return newsDao.add(news);
    }

    @Override
    public boolean deleteNews(int id) {
        return newsDao.delete(id);
    }

    @Override
    public List<News3> getNewsList() {
        return newsDao.getNewsList();
    }
}
